Kernel-based Virtual Machine
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
top
Kernel-based Virtual Machine (KVM) is a free and open-source virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. It was merged into the mainline Linux kernel in version 2.6.20, which was released on February 5, 2007.cite-ref-2620notes-1-0[1] KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V.cite-ref-2[2] KVM has also been ported to other operating systems such as FreeBSDcite-ref-3[3] and illumoscite-ref-4[4] in the form of loadable kernel modules.
KVM supports hardware-assisted virtualization for a wide variety of guest operating systems including BSD, Solaris, Windows, Haiku, ReactOS, Plan 9, AROS, macOS, and even other Linux systems.cite-ref-10[10]cite-ref-11[11] In addition, Android 2.2, GNU/Hurdcite-ref-12[12] (Debian K16), Minix 3.1.2a, Solaris 10 U3 and Darwin 8.0.1, together with other operating systems and some newer versions of these listed, are known to work with certain limitations.cite-ref-13[13]
Additionally, KVM provides paravirtualization support for Linux, OpenBSD,cite-ref-14[14] FreeBSD,cite-ref-15[15] NetBSD,cite-ref-16[16] Plan 9cite-ref-17[17] and Windows guests using the VirtIO API.cite-ref-18[18] This includes a paravirtual Ethernet card, disk I/O controller,cite-ref-19[19] balloon driver, and a VGA graphics interface using SPICE or VMware drivers.
Contents
• History
• Features
• See also
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
History
Avi Kivity began the development of KVM in mid-2006 at Qumranet, a technology startup companycite-ref-20[20] that was acquired by Red Hat in 2008.cite-ref-21[21]
KVM is maintained by Paolo Bonzini.cite-ref-23[23]
Internals
KVM provides device abstraction but no processor emulation. It exposes the /dev/kvm interface, which a user mode host can then use to:
• Set up the guest VM's address space. The host must also supply a firmware image (usually a custom BIOS when emulating PCs) that the guest can use to bootstrap into its main OS.
• Feed the guest simulated I/O.
• Map the guest's video display back onto the system host.
Originally, a forked version of QEMU was provided to launch guests and deal with hardware emulation that is not handled by the kernel. That support was eventually merged into the upstream project. There are now numerous Virtual Machine Monitors (VMMs) which can utilise the KVM interface including kvmtool, crosvm and Firecracker and numerous specialised VMMs built with frameworks such as rust-vmm.
Features
KVM has had support for hot swappable vCPUs,cite-ref-26[26] dynamic memory management,cite-ref-27[27] and Live Migration since February 2007.cite-ref-28[28]cite-ref-29[29] It also reduces the impact that memory write-intensive workloads have on the migration process.cite-ref-30[30]
Emulated hardware
KVM itself emulates very little hardware, instead deferring to a higher level client application such as QEMU, crosvm, or Firecracker for device emulation.
KVM provides the following emulated devices:
• VirtIO
Graphical management tools
• Kimchi – web-based virtualization management tool for KVM
• Virtual Machine Manager – supports creating, editing, starting, and stopping KVM-based virtual machines, as well as live or cold drag-and-drop migration of VMs between hosts.
• Proxmox Virtual Environment – an open-source virtualization management package including KVM and LXC. It has a bare-metal installer, a web-based remote management GUI, a HA cluster stack, unified storage, flexible network, and optional commercial support.
• OpenQRM – management platform for managing heterogeneous data center infrastructures
• GNOME Boxes – Gnome interface for managing libvirt guests on Linux
Licensing
The kernel-mode component of KVM is a part of the Linux kernel, itself licensed under GNU General Public License, version 2.cite-ref-linux-licensing-32-0[32]
See also
References
cite-note-2620notes-11. ↑ "Linux kernel 2.6.20, Section 2.2. Virtualization support through KVM". kernelnewbies.org. 2007-02-05. Retrieved 2014-06-16.
cite-note-22. ↑ KVM FAQ: What do I need to use KVM?
cite-note-33. ↑ "FreeBSD Quarterly Status Report: Porting Linux KVM to FreeBSD".
cite-note-44. ↑ "KVM on illumos". 15 August 2011.
cite-note-55. ↑ "Gmane - Mail To News And Back Again". Archived from the original on 2007-09-29. Retrieved 2007-05-07.
cite-note-66. ↑ Gmane Loom Archived 2007-09-29 at the Wayback Machine
cite-note-77. ↑ "KVM/ARM Open Source Project". Archived from the original on 2013-03-10. Retrieved 2017-11-01.
cite-note-88. ↑ citerefchristoffer-dalljason-nieh2014Christoffer Dall; Jason Nieh (2014). "KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor". SIGARCH Comput. Archit. News. 42 (1). ACM International Conference on Architectural Support for Programming Languages and Operating Systems: 333–348. doi:10.1145/2654822.2541946.
cite-note-99. ↑ "kernel/git/torvalds/linux.git: KVM: ia64: remove".
cite-note-1010. ↑ "KVM wiki: Guest support status". Retrieved 2007-05-27.
cite-note-1111. ↑ "Running Mac OS X as a QEMU/KVM Guest". Retrieved 2014-08-20.
cite-note-1212. ↑ "status". Gnu.org. Retrieved 2014-02-12.
cite-note-1313. ↑ "Guest Support Status - KVM". Linux-kvm.org. Retrieved 2014-02-12.
cite-note-1414. ↑ "OpenBSD man page virtio(4)". Retrieved 2018-02-04.
cite-note-1515. ↑ "virtio binary packages for FreeBSD". Retrieved 2012-10-29.
cite-note-1616. ↑ "NetBSD man page virtio(4)". Archived from the original on 2019-11-13. Retrieved 2013-07-15.
cite-note-1717. ↑ "plan9front". Retrieved 2013-02-11.
cite-note-1919. ↑ "SCSI target for KVM wiki". linux-iscsi.org. 2012-08-07. Archived from the original on 2020-06-05. Retrieved 2012-08-12.
cite-note-2222. ↑ "KVM 15 equipped with live migration | IT World Canada News". 7 March 2007.
cite-note-241. citerefkhoa-huynhstefan-hajnoczi2010Khoa Huynh; Stefan Hajnoczi (2010). "KVM/QEMU Storage Stack Performance Discussion" (PDF). IBM. Linux Plumbers Conference. Retrieved January 3, 2015.
cite-note-2525. ↑ "SeaBIOS". seabios.org. 2013-12-21. Retrieved 2014-06-16.
cite-note-2626. ↑ "Hot Plugging Virtual CPUs with Red Hat Enterprise Virtualization Manager". 16 February 2016.
cite-note-2727. ↑ "Faq - KVM".
cite-note-2828. ↑ "KVM-15 release [LWN.net]".
cite-note-2929. ↑ "Migration - KVM".
cite-note-3030. ↑ "Daniel P. Berrangé » Blog Archive » Analysis of techniques for ensuring migration completion with KVM".
cite-note-3131. ↑ "The Definitive KVM (Kernel-based Virtual Machine) API Documentation — the Linux Kernel documentation".
cite-note-linux-licensing-3232. ↑ "Linux kernel licensing rules — The Linux Kernel documentation". www.kernel.org. Archived from the original on 7 March 2020. Retrieved 2020-01-06.
Bibliography
• citerefamit-shah2016Amit Shah (2016-11-02). "Ten years of KVM". lwn.net. Retrieved 2017-02-10.
External links
• Best practices for the Kernel-based Virtual Machine Archived 2019-11-06 at the Wayback Machine, IBM, second edition, April 2012
• Virtio-blk Performance Improvement, KVM Forum 2012, November 8, 2012, by Asias He
• Wikibook QEMU & KVM
• crosvm - Chrome OS virtual machine monitor
• Firecracker VMM for KVM